<% content_for(:per_page_js){javascript_include_tag("response", "location_picker", "google_geocoder", 
  "dialog", "condition", "time_form_field", configatron.map_api_url)} %>
<%= render("layouts/location_picker") %>

<%= resp.answers.collect{|a| a.errors.full_messages.join(", ")}.join(" ") %>
<%= basic_form(resp) do |f|
  spec = {
    :sections => [{
      :name => "Response Info",
      :fields => [{
        :col => :form_id,
        :value => f.hidden_field(:form_id),
        :hidden => true
      },{
        :col => :user_id,
        :label => "Submitter",
        :required => true,
        :value => f.select(:user_id, User.select_options, :include_blank => true),
      },
      (f.mode == :show ? {:col => :source, :label => "Source", :value => content_tag("strong"){resp.source}} : nil),
      {
        :col => :reviewed,
        :label => "Reviewed?",
        :value => f.mode == :show ? 
          content_tag("div", :class => "dummy"){resp.reviewed? ? "Yes" : "No"} : 
          f.check_box(:reviewed?)
      }].compact
    },{
      :contents => answers_subform(resp.all_answers)
    }],
    # hackish fix until i refactor this code to the newer form style
    :footer => '<input name="commit_and_mark_reviewed" type="submit" value="Update and Mark as Reviewed" class="submit">'.html_safe
  }
end
%>

<br><br>